#include <stdio.h>
#include <iostream>
#include <unistd.h>
#include <signal.h>
#include <sys/types.h>

using namespace std;

void usage(string proc)
{
    cout << "usage:\n\t" << proc << "signum pid\n\n";
}

void myhandler(int signal)
{
    cout << "get a singal" << signal << endl;
}

//./kill 3 pid
int main(int args, char* argv[])
{
    if (args != 3)
    {
        usage(argv[0]);
        return 1;
    }

    int sign = stoi(argv[2]);
    pid_t pid = stoi(argv[1]);
    int n = kill(sign, pid);
    if (n < 0)
    {
        perror("kill");
        return 2;
    }
}